﻿manifest_destiny = {

	is_shown = {
		exists = c:USA
		root = c:USA
		NOT = { has_variable = manifested_destiny }
	}

	possible = {
		has_technology_researched = nationalism
		has_interest_marker_in_region = region_pacific_coast
	}

	when_taken = {
		if = {
			limit = {
				owns_entire_state_region = STATE_CALIFORNIA
				owns_entire_state_region = STATE_NEVADA
				owns_entire_state_region = STATE_UTAH
				owns_entire_state_region = STATE_ARIZONA
				owns_entire_state_region = STATE_NEW_MEXICO
				owns_entire_state_region = STATE_TEXAS
			}
			trigger_event = { id = manifest_destiny.1 }
		}
		else = {
			add_journal_entry = {
				type = je_manifest_destiny_mexico
			}
		}
		if = {
			limit = {
				owns_entire_state_region = STATE_MONTANA
				owns_entire_state_region = STATE_WYOMING
				owns_entire_state_region = STATE_COLORADO
				owns_entire_state_region = STATE_NORTH_DAKOTA
				owns_entire_state_region = STATE_SOUTH_DAKOTA
				owns_entire_state_region = STATE_NEBRASKA
				owns_entire_state_region = STATE_KANSAS
			}
			trigger_event = { id = manifest_destiny.2 }
		}
		else = {
			add_journal_entry = {
				type = je_manifest_destiny_frontier_wars
			}
		}
		ig:ig_landowners = {
			add_modifier = {
				name = ig_manifest_destiny
				months = normal_modifier_time
			}
		}
		ig:ig_intelligentsia = {
			add_modifier = {
				name = ig_manifest_destiny
				months = normal_modifier_time
				multiplier = -1
			}
		}
		if = {
			limit = {
				exists = c:MEX
			}
			create_incident = {
				country = c:MEX
				value = 20
			}
		}	
		# Add Claims
		s:STATE_CALIFORNIA = { 
			if = {
				limit = {
					any_scope_state = {
						NOT = {
							owner = ROOT
						}
					}
				}
				add_claim = ROOT 
			}
		}
		s:STATE_NEVADA = {  
			if = {
				limit = {
					any_scope_state = {
						NOT = {
							owner = ROOT
						}
					}
				}
				add_claim = ROOT 
			}
		}
		s:STATE_UTAH = { 
			if = {
				limit = {
					any_scope_state = {
						NOT = {
							owner = ROOT
						}
					}
				}
				add_claim = ROOT 
			}
		}
		s:STATE_ARIZONA = { 
			if = {
				limit = {
					any_scope_state = {
						NOT = {
							owner = ROOT
						}
					}
				}
				add_claim = ROOT 
			}
		}
		s:STATE_NEW_MEXICO = { 
			if = {
				limit = {
					any_scope_state = {
						NOT = {
							owner = ROOT
						}
					}
				}
				add_claim = ROOT 
			}
		}
		s:STATE_OKLAHOMA = { 
			if = {
				limit = {
					any_scope_state = {
						NOT = {
							owner = ROOT
						}
					}
				}
				add_claim = ROOT 
			}
		}
		s:STATE_MONTANA = { 
			if = {
				limit = {
					any_scope_state = {
						NOT = {
							owner = ROOT
						}
					}
				}
				add_claim = ROOT 
			}
		}
		s:STATE_WYOMING = {  
			if = {
				limit = {
					any_scope_state = {
						NOT = {
							owner = ROOT
						}
					}
				}
				add_claim = ROOT 
			}
		}
		s:STATE_COLORADO = { 
			if = {
				limit = {
					any_scope_state = {
						NOT = {
							owner = ROOT
						}
					}
				}
				add_claim = ROOT 
			}
		}
		s:STATE_NORTH_DAKOTA = { 
			if = {
				limit = {
					any_scope_state = {
						NOT = {
							owner = ROOT
						}
					}
				}
				add_claim = ROOT 
			}
		}
		s:STATE_SOUTH_DAKOTA = { 
			if = {
				limit = {
					any_scope_state = {
						NOT = {
							owner = ROOT
						}
					}
				}
				add_claim = ROOT 
			}
		}
		s:STATE_NEBRASKA = { 
			if = {
				limit = {
					any_scope_state = {
						NOT = {
							owner = ROOT
						}
					}
				}
				add_claim = ROOT 
			}
		}
		s:STATE_KANSAS = { 
			if = {
				limit = {
					any_scope_state = {
						NOT = {
							owner = ROOT
						}
					}
				}
				add_claim = ROOT 
			}
		}
		s:STATE_TEXAS = { 
			if = {
				limit = {
					any_scope_state = {
						NOT = {
							owner = ROOT
						}
					}
				}
				add_claim = ROOT 
			}
		}
		set_variable = manifested_destiny
	}

	ai_chance = {
		base = 10
	}
}